<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core_1_1" %>
<%--
  Created by IntelliJ IDEA.
  User: Wang Ziming
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <div class="nav-del">
        <span>出游队伍</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <form action="/admin/adminSearch" method="post" id="searchForm">
            <%--不支持回显功能--%>
            <input type="text" id="search-group" name="search-group">
            <button type="button" id="start-search-group">查询队伍</button>
        </form>
    </div>
    <hr>

    <%--判断是否能够获取request域中的数据--%>
</body>
<%--css--%>
<style type="text/css">
    .nav-del{
        margin-top: 3%;
    }
    #searchForm{
        /*float: right;*/
        margin-left: 300px;
    }

</style>
<%--js--%>
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script>
    $(function () {
        /*队伍查询*/
        $("#start-search-group").click(function () {
            var sgroup = $("#search-group").val();
            //判别搜索栏是否为空
            if (isEmpty(sgroup)) {
                //无反应
                return;
            }
            //手动提交
            $("#searchForm").submit();
        });
    });

    /**
     * 判断字符串是否为空：账户 / 密码
     * @param str
     * @returns {boolean}
     */
    function isEmpty(str) {
        if (str == null || str.trim() == "") {
            return true;
        }
        return false;
    }
</script>
</html>
